<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../vue.js"></script>

</head>

<body>
<div id="box">
<!--  v-for数组  -->
    <input type="text" v-model="t">  <button v-on:click="vue6.add()">点击</button>

    <ul>
        <li v-for="(value,index) in arr">{{index+1}}:{{value}}</li>
    </ul>
    <ul>
        <li v-for="(value,key,index) in p">{{index+1}}.{{key}}:{{value}}</li>
    </ul>
    <ul>
        <li v-for= "n in 10">{{n}}</li>
    </ul>
</div>
</body>
<script>
    var vue6=new Vue({
        el:"#box",
        data:{
            t:"我是小米",
            arr:["1111"," 2222","3333"],
            p:{
                name:"小米",
                age:18,
                sex:'男'
            }
        },
        methods:{
          add(){
                this.arr.push(this.t);
            }
        }
    })
</script>
</html>